
package com.jf.cloud.multishop.service;

import com.jf.cloud.common.database.dto.PageDTO;
import com.jf.cloud.common.database.vo.PageVO;
import com.jf.cloud.multishop.dto.ShopWithdrawCashConfigDto;
import com.jf.cloud.multishop.dto.ShopWithdrawCashDTO;
import com.jf.cloud.multishop.model.ShopWithdrawCash;
import com.jf.cloud.multishop.vo.ShopWalletLogExcelVO;
import com.jf.cloud.multishop.vo.ShopWithdrawCashLogExcelVO;
import com.jf.cloud.multishop.vo.ShopWithdrawCashVO;

import java.util.List;

/**
 * 商家提现申请信息
 *
 * @author zz
 * @date 2021-01-07 16:41:03
 */
public interface ShopWithdrawCashService {

    /**
     * 分页获取商家提现申请信息列表
     * @param pageDTO 分页参数
     * @return 商家提现申请信息列表分页数据
     */
    PageVO<ShopWithdrawCash> page(PageDTO pageDTO);

    /**
     * 根据商家提现申请信息id获取商家提现申请信息
     *
     * @param cashId 商家提现申请信息id
     * @return 商家提现申请信息
     */
    ShopWithdrawCash getByCashId(Long cashId);

    /**
     * 保存商家提现申请信息
     * @param shopWithdrawCash 商家提现申请信息
     */
    void save(ShopWithdrawCash shopWithdrawCash);

    /**
     * 更新商家提现申请信息
     * @param shopWithdrawCash 商家提现申请信息
     */
    void update(ShopWithdrawCash shopWithdrawCash);

    /**
     * 根据商家提现申请信息id删除商家提现申请信息
     * @param cashId 商家提现申请信息id
     */
    void deleteById(Long cashId);

    /**
     * 根据店铺id提交提现申请
     * @param shopWithdrawCashDTO
     * @param shopId
     */
    void apply(ShopWithdrawCashDTO shopWithdrawCashDTO, Long shopId);

    /**
     * 根据参数分页获取商家提现记录信息
     * @param pageDTO
     * @param shopWithdrawCashDTO
     * @return
     */
    PageVO<ShopWithdrawCashVO> pageByParam(PageDTO pageDTO, ShopWithdrawCashDTO shopWithdrawCashDTO);

    List<ShopWithdrawCashLogExcelVO>  listShopWithdrawCashLogExcel(ShopWithdrawCashDTO shopWithdrawCashDTO);

    /**
     * 根据id获取提现申请详情信息
     * @param cashId
     * @return
     */
    ShopWithdrawCashVO getDetailByCashId(Long cashId);

    /**
     * 审核商家提现信息
     * @param shopWithdrawCashDTO
     * @param userId
     */
    void auditWithdrawCash(ShopWithdrawCashDTO shopWithdrawCashDTO, Long userId);

    /**
     * 保存提现配置
     * @param shopWithdrawCashDto
     */
    void saveConfig(ShopWithdrawCashConfigDto shopWithdrawCashDto);

    /**
     * 获取提现配置
     * @return
     */
    ShopWithdrawCashConfigDto getConfig();

    /**
     * 检验提现金额
     * @param amount
     */
    void checkDrawCashAmount(Long amount);
}
